package com.yycx.module.bus.provider.handler.haiying.ackamount;

import com.yycx.common.base.entity.EntityMap;
import com.yycx.common.mybatis.interceptor.DeleteInterceptor;
import com.yycx.common.mybatis.query.CriteriaDelete;
import com.yycx.module.bus.provider.service.hy.BusHyorderReturnService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.io.Serializable;

/**
 * 海鹰回款删除扩展
 *
 * @author zyf
 */
@Component("hyHkPaymentDeleteHandler")
public class HyHkPaymentDeleteHandler implements DeleteInterceptor {



    @Autowired
    private BusHyorderReturnService hyorderReturnService;


    @Override
    public void prepare(CriteriaDelete cd, EntityMap entityMap) {


    }

    @Override
    public void complete(CriteriaDelete cd, EntityMap params) {
        Serializable paymentId = cd.getIdValue();
        hyorderReturnService.clearHuiKuanInfo(paymentId);

    }
}
